
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>


<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>JSP Page</title>
        </head>
        <body>
            <h1 align="center">DANH SACH LOP HOC</h1>
            <h:form id="frm">
                <h:dataTable width="100%" border="1" var="lh" id="table" value="#{lopHocBean.allLophoc}">
                    <h:column id="ms" headerClass="headertext">
                        <f:facet name="header">
                            <h:outputText style="headerText" value="Mã số Lớp"/>
                        </f:facet>
                        <h:outputText id="ml" value="#{lh.msLop}"/>
                    </h:column>
                    <h:column id="ten" headerClass="headertext">
                        <f:facet name="header">
                            <h:outputText style="headerText" value="tên Lớp"/>
                        </f:facet>
                        <h:outputText id="tl" value="#{lh.tenLop}"/>
                    </h:column>
                    <h:column id="gv" headerClass="headertext">
                        <f:facet name="header">
                            <h:outputText style="headerText" value="Giáo viên chủ nhiệm"/>
                        </f:facet>
                        <h:outputText id="gvcn" value="#{lh.tenGVCN}"/>
                    </h:column>
                    <h:column id="actions" headerClass="headertext">
                        <f:facet name="header">
                            <h:commandLink value="Insert New"  action="insert" immediate="true"/>
                        </f:facet>
                        <h:commandLink value="Edit" immediate="true" actionListener="#{lopHocBean.editBook}" action="edit"/> -
                        <h:commandLink value="Delete" actionListener="#{lopHocBean.deleteAction}"/>
                    </h:column>

                    <%--<f:facet name="footer">
	                        <h:panelGroup style="align:right">
	                            <h:outputLabel value="Number of records"/>
	                        </h:panelGroup>
	                    </f:facet>--%>
                </h:dataTable>
            </h:form>
        </body>
    </html>
</f:view>
